<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="/js/bootstrap-3.4.1-dist/css/bootstrap.css">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/client/header.jsp" %>
    <link type="text/css" rel="stylesheet" href="${ctx}/statics/css/style.css"/>
</head>
<body>
<%@ include file="/common/manager/searchBar.jsp" %>
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
    <div class="m_content">
        <%@ include file="/common/manager/leftBar.jsp" %>
        <div class="m_right">
            <p></p>
            <div class="mem_tit">资讯列表</div>
            <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>

                <tr>
                    <td width="20%">文章标题</td>
                    <td width="25%">创建时间</td>
                </tr>
                <c:forEach var="news" items="${t_noticePage.pageList}">
                    <tr>
                        <td><a href="/Detail?id=${news.id}">${news.title}</a></td>
                        <td>${news.create_time}</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <%--分页--%>
            <div class="pages">
                <a class = "btn btn-info" href = "/news?pageNo=1">首页</a>

                <c:choose>
                    <c:when test="${t_noticePage.pageNo==1}">
                        <a class = "btn btn-default" disabled href = "javascript:void(0)">上一页</a>
                    </c:when>
                    <c:otherwise>
                        <a class = "btn btn-info" href = "/news?pageNo=${t_noticePage.pageNo-1}">上一页</a>
                    </c:otherwise>
                </c:choose>

                <c:choose>
                    <c:when test="${t_noticePage.pageNo == t_noticePage.totalPage}">
                        <a class = "btn btn-default" disabled href = "javascript:void(0)">下一页</a>
                    </c:when>
                    <c:otherwise>
                        <a class = "btn btn-info" href = "/news?pageNo=${t_noticePage.pageNo+1}">下一页</a>
                    </c:otherwise>
                </c:choose>

                <a class = "btn btn-info" href = "/news?pageNo=${t_noticePage.totalPage}">末页</a>

            </div>
            <%--分页end--%>
        </div>
    </div>
    <%@ include file="/common/client/footer.jsp" %>
</div>
</body>

</html>
